﻿<navigation:Page x:Class="WrapperDemo.Page"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
           xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" 
           xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit" xmlns:ImageTools="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls" Width="730" 
           Height="700"
           Title="Page Page">

    <Grid x:Name="LayoutRoot" Background="Wheat" Loaded="LayoutRoot_Loaded">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="488*" />
            <ColumnDefinition Width="262*" />
        </Grid.ColumnDefinitions>
        <controls:TabControl x:Name="tab" TabStripPlacement="Left" Margin="0,0,0,200">
            <controls:TabItem Header="GetSelfInfo">
                <StackPanel x:Name="sp_self">
                    <Button Content="Invoke" x:Name="GetSelfInfo" Click="InvokeGetSelfInfo" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock x:Name="tb_selfUid" />

                    <StackPanel Orientation="Horizontal">
                        <!--<ImageTools:AnimatedImage Source="{Binding StatusAgent}" Height="13" Width="13" />-->
                        <TextBlock Text="{Binding}" />
                    </StackPanel>
                    <Image Source="{Binding PicSmall}" Height="45"/>
                    <TextBlock Text="{Binding FirstName}" />
                    <TextBlock Text="{Binding LastName}" />
                    <TextBlock Text="{Binding Nick}" />
                    <TextBlock Text="{Binding Sex}" />
                    <TextBlock Text="{Binding Birthday}" />
                    <TextBlock Text="{Binding Pic}" />
                    <TextBlock Text="{Binding PicSmall}" />
                    <TextBlock Text="{Binding PicBig}" />
                    <TextBlock Text="{Binding Link}" />
                    <TextBlock Text="{Binding Uid}" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="FriendsGet">
                <StackPanel>
                    <Button Content="Invoke" x:Name="FriendsGet" Click="InvokeFriendsGet" />
                    <TextBlock TextWrapping="Wrap" Text="" />
                    <CheckBox x:Name="cb_friendsGet" Content="ext"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="FriendsGetAppUsers">
                <StackPanel>
                    <Button Content="Invoke" x:Name="FriendsGetAppUsers" Click="InvokeFriendsGetAppUsers" />
                    <TextBlock TextWrapping="Wrap" Text="" />
                    <CheckBox x:Name="cb_friendsGetAppUsers" Content="ext"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="UsersGetInfo">
                <StackPanel>
                    <Button Content="Invoke" x:Name="UsersGetInfo" Click="InvokeUsersGetInfo" />

                    <TextBlock TextWrapping="Wrap" Text="IUser[] UsersGetInfo(string[] uids)" />
                    <dataInput:Label Content="uids:"/>
                    <ListBox x:Name="_list_usersGetInfo"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="UsersIsAppUser">
                <StackPanel>
                    <Button Content="Invoke" x:Name="UsersIsAppUser" Click="InvokeUsersIsAppUser" />
                    <TextBlock TextWrapping="Wrap" Text="" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="UsersHasAppPermission">
                <StackPanel>
                    <Button Content="Invoke" x:Name="UsersHasAppPermission" Click="InvokeUsersHasAppPermission" />
                    <TextBlock TextWrapping="Wrap" Text="" />
                    <dataInput:Label Content="param:"/>
                    <ComboBox x:Name="cbx_usersHasAppPermission"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PaymentsOpenDialog">
                <StackPanel>
                    <Button Content="Invoke" x:Name="PaymentsOpenDialog" Click="InvokePaymentsOpenDialog" />

                    <TextBlock TextWrapping="Wrap" Text="bool PaymentsOpenDialog(int service_id, string service_name, int sms_price,int other_price = 0)" />
                    <dataInput:Label Content="service_id:"/>
                    <inputToolkit:NumericUpDown x:Name="nud_playmentsServiceId" />
                    <dataInput:Label Content="service_name:"/>
                    <TextBox x:Name="tb_playmentsServiceName" />
                    <dataInput:Label Content="sms_price:"/>
                    <inputToolkit:NumericUpDown Name="nud_playmentsSmsPrice" />
                    <dataInput:Label Content="other_price:"/>
                    <inputToolkit:NumericUpDown Name="nud_playmentsOtherPrice" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="StreamPublish">
                <StackPanel>
                    <Button Content="Invoke" x:Name="StreamPublish" Click="InvokeStreamPublish" />

                    <TextBlock TextWrapping="Wrap" Text="bool StreamPublish(string text, string post = null, int img = 0)" />
                    <dataInput:Label Content="text:"/>
                    <TextBox x:Name="tb_streamText" />
                    <dataInput:Label Content="post:"/>
                    <TextBox x:Name="tb_streamPost" />
                    <dataInput:Label Content="img:"/>
                    <inputToolkit:NumericUpDown Name="nud_streamImg" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PhotosGetAlbums">
                <StackPanel>
                    <Button Content="Invoke" x:Name="PhotosGetAlbums" Click="InvokePhotosGetAlbums" />

                    <TextBlock TextWrapping="Wrap" Text="" />
                    <dataInput:Label Content="aids:"/>
                    <ListBox x:Name="_list_photoAlbumsPhotosGetAlbums" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PhotosGet">
                <StackPanel>
                    <Button Content="Invoke" x:Name="PhotosGet" Click="InvokePhotosGet" />

                    <TextBlock TextWrapping="Wrap" Text="" />
                    <dataInput:Label Content="aid:"/>
                    <TextBlock Text="{Binding ElementName=list_photoAlbums, Path=SelectedItem}" />
                    <dataInput:Label Content="pids:"/>
                    <ListBox x:Name="_list_photosPhotosGet" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="AudiosGet">
                <StackPanel>
                    <Button Content="Invoke" x:Name="AudiosGet" Click="InvokeAudiosGet" />

                    <TextBlock TextWrapping="Wrap" Text="" />
                    <dataInput:Label Content="mids:"/>
                    <ListBox x:Name="_list_audiosAudiosGet" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="AudiosLinkAudio">
                <StackPanel>
                    <Button Content="Invoke" x:Name="AudiosLinkAudio" Click="InvokeAudiosLinkAudio" />

                    <TextBlock TextWrapping="Wrap" Text="bool AudiosLinkAudio(string mid)" />
                    <dataInput:Label Content="mid:"/>
                    <TextBlock Text="{Binding ElementName=list_audios, Path=SelectedItem}" />
                </StackPanel>
            </controls:TabItem>
        </controls:TabControl>

        <StackPanel  Grid.Column="1">
            <StackPanel Orientation="Horizontal">
                <dataInput:Label Content="Users, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_users}" />
            </StackPanel>
            <ListBox Name="list_users" Height="109" SelectionMode="Extended" SelectionChanged="list_users_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <!--<ImageTools:AnimatedImage Source="{Binding StatusAgent}" Height="13" Width="13" />-->
                            <TextBlock Text="{Binding}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <Image Source="{Binding PicSmall}" Height="45"/>
                                    <TextBlock Text="{Binding FirstName}" />
                                    <TextBlock Text="{Binding LastName}" />
                                    <TextBlock Text="{Binding Nick}" />
                                    <TextBlock Text="{Binding Sex}" />
                                    <TextBlock Text="{Binding Birthday}" />
                                    <TextBlock Text="{Binding Pic}" />
                                    <TextBlock Text="{Binding PicSmall}" />
                                    <TextBlock Text="{Binding PicBig}" />
                                    <TextBlock Text="{Binding Link}" />
                                    <TextBlock Text="{Binding Uid}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Orientation="Horizontal">
                <dataInput:Label  Content="PhotoAlbums, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_photoAlbums}" ></dataInput:Label>
            </StackPanel>
            <ListBox Name="list_photoAlbums" Height="109" SelectionMode="Extended" SelectionChanged="list_photoAlbums_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <TextBlock Text="{Binding Aid}" />
                                    <TextBlock Text="{Binding CoverPid}" />
                                    <TextBlock Text="{Binding Owner}" />
                                    <TextBlock Text="{Binding Title}" />
                                    <TextBlock Text="{Binding Description}" />
                                    <TextBlock Text="{Binding Created}" />
                                    <TextBlock Text="{Binding Updated}" />
                                    <TextBlock Text="{Binding Size}" />
                                    <TextBlock Text="{Binding Privacy}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Orientation="Horizontal">
                <dataInput:Label  Content="Photos, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_photos}" />
            </StackPanel>
            <ListBox Name="list_photos" Height="109" SelectionMode="Extended" SelectionChanged="list_photos_SelectionChanged" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <Image Source="{Binding SrcSmall}" Height="45"/>
                                    <TextBlock Text="{Binding Pid}" />
                                    <TextBlock Text="{Binding Aid}" />
                                    <TextBlock Text="{Binding Owner}" />
                                    <TextBlock Text="{Binding Src}" />
                                    <TextBlock Text="{Binding SrcSmall}" />
                                    <TextBlock Text="{Binding SrcBig}" />
                                    <TextBlock Text="{Binding Created}" />
                                    <TextBlock Text="{Binding Size}" />
                                    <TextBlock Text="{Binding Width}" />
                                    <TextBlock Text="{Binding Height}" />
                                    <TextBlock Text="{Binding Title}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Orientation="Horizontal">
                <dataInput:Label  Content="Audios, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_audios}" />
            </StackPanel>
            <ListBox Name="list_audios" Height="109" SelectionMode="Extended" SelectionChanged="list_audios_SelectionChanged" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding}" />
                            <ToolTipService.ToolTip>
                              <ToolTip>
                                <StackPanel>
                                    <MediaElement x:Name="me" Source="{Binding Link}" />
                                    <TextBlock Text="{Binding ElementName=me, Path=Position}" />
                                    <TextBlock Text="{Binding Mid}" />
                                    <TextBlock Text="{Binding Owner}" />
                                    <TextBlock Text="{Binding Artist}" />
                                    <TextBlock Text="{Binding Title}" />
                                    <TextBlock Text="{Binding Duration}" />
                                    <TextBlock Text="{Binding Size}" />
                                    <TextBlock Text="{Binding Created}" />
                                    <TextBlock Text="{Binding Link}" />
                                </StackPanel>
                              </ToolTip>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <TextBlock Text="v 1.3" />
        </StackPanel>

        
        <controls:TabControl Margin="0,500,0,29" Grid.ColumnSpan="2">
            <controls:TabItem Header="Log">
                <ListBox x:Name="logList" SelectionChanged="logList_SelectionChanged" />
            </controls:TabItem>
            <controls:TabItem Header="InitParams">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="23" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <TextBox x:Name="tb_query" />
                    <ListBox x:Name="initParams" SelectionChanged="initParams_SelectionChanged" Grid.Row="2" />
                </Grid>
            </controls:TabItem>
        </controls:TabControl>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="0,677,0,0" Name="textBox1" VerticalAlignment="Top" Width="730" Grid.ColumnSpan="2" />
        <ComboBox SelectionChanged="cbx_format_SelectionChanged" x:Name="cbx_format" Height="20" HorizontalAlignment="Left" Margin="10,0,0,330" VerticalAlignment="Bottom" Width="140"/>
    </Grid>

</navigation:Page>
